home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 10
/
AACD 10.iso
/
AACD
/
System
/
MCC_SpeedBar
/
Developer
/
Autodocs
/
MCC_SpeedBar.doc
Wrap
Text File
|
1999-10-13
|
9KB
|
422 lines
TABLE OF CONTENTS
0001 SpeedBar.mcc/MUIA_SpeedBar_Borderless
0002 SpeedBar.mcc/MUIA_SpeedBar_Buttons
0003 SpeedBar.mcc/MUIA_SpeedBar_Images
0004 SpeedBar.mcc/MUIA_SpeedBar_RaisingFrame
0005 SpeedBar.mcc/MUIA_SpeedBar_SameHeight
0006 SpeedBar.mcc/MUIA_SpeedBar_SameWidth
0007 SpeedBar.mcc/MUIA_SpeedBar_SmallImages
0008 SpeedBar.mcc/MUIA_SpeedBar_SpacerIndex
0009 SpeedBar.mcc/MUIA_SpeedBar_Spread
0010 SpeedBar.mcc/MUIA_SpeedBar_StripUnderscore
0011 SpeedBar.mcc/MUIA_SpeedBar_Sunny
0012 SpeedBar.mcc/MUIA_SpeedBar_ViewMode
0013 SpeedBar.mcc/MUIM_SpeedBar_AddButton
0014 SpeedBar.mcc/MUIM_SpeedBar_AddButtonObject
0015 SpeedBar.mcc/MUIM_SpeedBar_AddSpacer
0016 SpeedBar.mcc/MUIM_SpeedBar_Clear
0017 SpeedBar.mcc/MUIM_SpeedBar_DoOnButton
0018 SpeedBar.mcc/MUIM_SpeedBar_GetObject
0019 SpeedBar.mcc/SpeedBar.mcc
SpeedBar.mcc/MUIA_SpeedBar_Borderless
NAME
MUIA_SpeedBar_Borderless -- BOOL [IS.]
FUNCTION
Remove the frames from the gadgets
SEE ALSO
SpeedBar.mcc/MUIA_SpeedBar_Buttons
NAME
MUIA_SpeedBar_Buttons -- struct MUIS_SpeedBar_Button * [I..]
FUNCTION
Specify an array of buttons that should be placed in the bar.
The structure you need to fill consists of these fields:
struct MUIS_SpeedBar_Button {
ULONG Img;
STRPTR Text;
STRPTR Help;
UWORD Flags;
struct IClass *Class;
Object *Object;
};
Img is the index of the MyBrush image used by the button.
Text is the button label.
Help is the button short-help (for bubble help)
Flags can be used to set the type of button you need (see
SpeedBar_mcc.h)
Class if you want to subclass SpeedButton.mcc to add drag'n'drop
or something place the pointer to your new class here:
these way SpeedBar will know how to recreate your buttons
correctly.
Otherwise leave it to NULL.
Object this will be filled after the creation of the bar with
a pointer to the button. Remember not to cache it and
have a look at Demo.c to see how to reference other
SpeedBar members correctly.
NOTES
SEE ALSO
MUIA_SpeedBar_Images
SpeedBar.mcc/MUIA_SpeedBar_Images
NAME
MUIA_SpeedBar_Images -- struct MyBrush ** [I.G]
FUNCTION
Specify the images which will be used by the buttons of the bar
SEE ALSO
SpeedBar.mcc/MUIA_SpeedBar_RaisingFrame
NAME
MUIA_SpeedBar_RaisingFrame -- BOOL [IS.]
FUNCTION
Setting this and _Borderless to TRUE will give you a toolbar whose
buttons will draw a frame around them when you move the pointer
over them.
SEE ALSO
MUIA_SpeedBar_Borderless
SpeedBar.mcc/MUIA_SpeedBar_SameHeight
NAME
MUIA_SpeedBar_SameHeight -- BOOL [I..]
FUNCTION
Set it to FALSE if you don't want all the buttons to have
the same height. This is only useful if you have a vertical
toolbar.
SEE ALSO
MUIA_SpeedBar_SameWidth
SpeedBar.mcc/MUIA_SpeedBar_SameWidth
NAME
MUIA_SpeedBar_SameWidth -- BOOL [I..]
FUNCTION
Set it to FALSE if you don't want all the buttons to have
the same width. This is only useful if you have an horizontal
toolbar.
SEE ALSO
MUIA_SpeedBar_SameHeight
SpeedBar.mcc/MUIA_SpeedBar_SmallImages
NAME
MUIA_SpeedBar_SmallImages -- BOOL [IS.]
FUNCTION
If set to TRUE the images will be reduced to 2/3 of their original
size.
SEE ALSO
SpeedBar.mcc/MUIA_SpeedBar_SpacerIndex
NAME
MUIA_SpeedBar_SpacerIndex -- UWORD [I.G]
FUNCTION
If you want an empty spacer object, set this to -1, otherwise
set it to the index of the images inside the _Images array.
SEE ALSO
MUIA_SpeedBar_Images
SpeedBar.mcc/MUIA_SpeedBar_Spread
NAME
MUIA_SpeedBar_Spread -- BOOL [I..]
FUNCTION
Setting this to TRUE will cause the bar to layout the objects
evenly, stretching spacer objects. Otherwise the bar will be
left aligned.
SEE ALSO
SpeedBar.mcc/MUIA_SpeedBar_StripUnderscore
NAME
MUIA_SpeedBar_StripUnderscore -- BOOL [I..]
FUNCTION
Causes the bar to strip underscores from buttons labels.
I don't think you'd need this, but I do :)
SEE ALSO
SpeedBar.mcc/MUIA_SpeedBar_Sunny
NAME
MUIA_SpeedBar_Sunny -- BOOL [IS.]
FUNCTION
Do you need buttons a là IE5 (coloured when the mouse is over
them and grey otherwise)? Set this to TRUE then :)
SEE ALSO
SpeedBar.mcc/MUIA_SpeedBar_ViewMode
NAME
MUIA_SpeedBar_ViewMode -- UWORD [ISG]
FUNCTION
Set the style of the toolbar. See SpeedBar_mcc.h for the available
options.
SEE ALSO
SpeedBar_mcc.h
SpeedBar.mcc/MUIM_SpeedBar_AddButton
NAME
MUIM_SpeedBar_AddButton
SYNOPSIS
DoMethod( obj, MUIM_SpeedBar_AddButton, speedbar_button );
FUNCTION
Adds a button to the bar.
INPUTS
speedbar_button pointer to a MUIS_SpeedBar_Button structure
RESULT
Object * to the created button.
SEE ALSO
SpeedBar.mcc/MUIM_SpeedBar_AddButtonObject
NAME
MUIM_SpeedBar_AddButtonObject
SYNOPSIS
DoMethod( obj, MUIM_SpeedBar_AddButtonObject, button );
FUNCTION
Adds an object to the bar.
INPUTS
Object *button - object you want to add
RESULT
none you should care about
SEE ALSO
SpeedBar.mcc/MUIM_SpeedBar_AddSpacer
NAME
MUIM_SpeedBar_AddSpacer
SYNOPSIS
DoMethod( obj, MUIM_SpeedBar_AddSpacer );
FUNCTION
Adds a spacer object
RESULT
Object * to the spacer created.
SEE ALSO
SpeedBar.mcc/MUIM_SpeedBar_Clear
NAME
MUIM_SpeedBar_Clear
SYNOPSIS
DoMethod( obj, MUIM_SpeedBar_Clear );
FUNCTION
Clears the toolbar.
SEE ALSO
SpeedBar.mcc/MUIM_SpeedBar_DoOnButton
NAME
MUIM_SpeedBar_DoOnButton
SYNOPSIS
DoMethod( obj, MUIM_SpeedBar_DoOnButton, i, method, ... );
FUNCTION
Performs the specified method on the i-th object of the bar.
INPUTS
ULONG i index of the object to send the method to
ULONG method method to invoke
EXAMPLE
DoMethod( buttons[ 0 ].Object, MUIM_Notify, MUIA_Selected, FALSE,
SpeedBar, 5,
MUIM_SpeedBar_DoOnButton, 1, MUIM_Set, MUIA_Selected, FALSE );
NOTES
This methods MUST be used if you change the toolbar style
without destroying and recreating the bar!
SEE ALSO
SpeedBar.mcc/MUIM_SpeedBar_GetObject
NAME
MUIM_SpeedBar_GetObject
SYNOPSIS
Object *obj = (Object *)DoMethod( bar, MUIM_SpeedBar_GetObject, i );
FUNCTION
Returns a pointer to the object number i in the bar.
INPUTS
ULONG i index of the object you need
RESULT
Object *obj the object you need
NOTES
SEE ALSO
SpeedBar.mcc/SpeedBar.mcc
NOTES
SpeedBar.mcc, SpeedButton.mcc ©1999 by Simone Tellini
All Rights Reserved.
SpeedBar.mcc and SpeedButton.mcc allow you to easily create toolbars
similar to those you can see in Windows programs (although you can
get a standard look as well ;)
SpeedBar.mcc is just a MUIC_Group subclass which should contain only
a set of SpeedButton objects: if you need it to contain other kinds of
objects, well, try it... it might work.
These classes can be freely used: all I ask is to receive a registered
copy of your program if it uses them.
IMPORTANT NOTE: if you plan to offer the user the chance to change
the toolbar style on the fly you should *NEVER* cache
the pointer to single buttons: this means that something
like this should never be seen in your code:
set( button, MUIA_Disabled, TRUE ); // just an example
where button is an Object * to a SpeedBar member.
The reason behind this is that some of the style changes
may cause the bar to destroy and recreate all the buttons
thus invalidatin all the previous pointers.
But don't worry: you have MUIM_SpeedBar_GetObject and
MUIM_SpeedBar_DoOnButton to solve the problem.
P.S. Remember that programmers don't write docs... so bear with me
if some points may result unclear or badly written :)